@extends('backend::modal')
@section('title',$page_title??'编辑角色')
@push('styles')
    <link href="{{asset(config('view.plugin').'/layui/layui_ext/dtree/font/dtreefont.css')}}" rel="stylesheet">
    <link href="{{asset(config('view.plugin').'/layui/layui_ext/dtree/dtree.css')}}" rel="stylesheet">
@endpush
@section('content')
    <div class="row">
        <div class="col-lg-12">
            @component('backend::component.form.form')
                @slot('form_title') {{$page_title}} @endslot
                @slot('formId') edit-role @endslot
                @slot('action') {{route('b_Role_editRole',['role_id'=>$info->id])}} @endslot

                @component('backend::component.form.form-group')
                    @slot('title') 角色名称 @endslot
                    @component('backend::component.form.input')
                        @slot('name') role_title @endslot
                        @slot('value') {{$info->title}} @endslot
                    @endcomponent
                @endcomponent

                @component('backend::component.form.form-group')
                    @slot('title') 描述 @endslot
                    @component('backend::component.form.textarea')
                        @slot('name') comment @endslot
                        @slot('row') 3 @endslot
                        @slot('value') {{$info->comment}} @endslot
                    @endcomponent
                @endcomponent

                @component('backend::component.form.form-group')
                    @slot('title') 状态 @endslot
                    <div>
                        @foreach(['0'=>'禁用','1'=>'启用'] as $value=>$title)
                            @component('backend::component.radio')
                                @slot('title') {{$title}} @endslot
                                @slot('name') status @endslot
                                @slot('value') {{$value}} @endslot
                                @if($info->status == $value )
                                    @slot('checked') checked @endslot
                                @endif
                            @endcomponent
                        @endforeach
                    </div>
                @endcomponent


                @slot('buttons')
                    @component('backend::component.form.button')
                        @slot('title') 提交 @endslot
                        @slot('params') {"formId":"#edit-role"} @endslot
                        @slot('class') btn-min-width ajax-form @endslot
                    @endcomponent
                    @component('backend::component.form.button')
                        @slot('title') 重置 @endslot
                        @slot('type') reset @endslot
                        @slot('color') danger @endslot
                        @slot('class') btn-min-width @endslot
                    @endcomponent
                @endslot
            @endcomponent
        </div>
        <!--/.col-->
    </div>
@endsection
@push('scripts')
    <script>

    </script>
@endpush